Documentation > CMS Template API Library > Input > ShowCheckBox(String,String,String,String,String,String,Nullable[Boolean],String,Boolean,Boolean)
ShowCheckBox
Adds a checkbox control to the input screen.
public System.Void ShowCheckBox(String,String,String,String,String,String,Nullable[Boolean],String,Boolean,Boolean)
Parameters
Name | Description | Type |
---|---|---|
label | The label of the field when displayed. | System.String |
fieldName | The field name where the value will be stored. | System.String |
storedValue | The value which gets stored when the checkbox is clicked. | System.String |
checkBoxLabel | Describing the checkbox function. (will display right of checkbox) | System.String |
helpMessage | Optional: help message | System.String |
unCheckedValue | Optional: The value which gets stored when the checkbox is not clicked. | System.String |
defaultChecked | Optional: The default state of the checkbox. True is checked, false is unchecked, null is not set (not applicable in Classic). Defaults to null. This may be false only if unCheckedValue is also specified. | Nullable<Boolean> |
popupMessage | Optional: The popup help message. | System.String |
requiredField | Optional: Mark the field required. Defaults to false | System.Boolean |
alwaysSend | Optional: If true, the value of the field will always be sent from the frontend to the backend regardless of whether its state has changed. | System.Boolean |
Code Example
C#
Sample:
<% Input.ShowCheckBox("Feature This?", "feature_this", "yes", "yes"); %>